<template>
  <div class="common-layout">
    <el-container>
      <el-aside width="200px">
        <Nav></Nav>
      </el-aside>
      <el-container>
        <el-header class="header">
          <div class="left">左侧</div>
          <div class="center">中间</div>
          <div class="right">右侧</div>
        </el-header>
        <el-main class="main">
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup>
// 导航
import Nav from '../Nav/index.vue';
</script>

<style scoped>
.header{
  border-bottom: 2px solid red;
  height: 56px;
  line-height: 56px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
/* header左 */
.left{
  width: 200px;
  height: 56px;
}
/* header中 */
.center{
  flex: 1;
  height: 56px;
  text-align: center;
}
/* header右 */
.right{
  width: 200px;
  height: 56px;
}
/* 去除主视口区域默认样式 */
.main{
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  height: calc(100vh - 56px);
}
</style>